package com.chartboost.sdk.impl;

import android.content.Context;
import android.view.MotionEvent;
import android.view.OrientationEventListener;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import com.chartboost.sdk.Chartboost;
import com.chartboost.sdk.Libraries.CBOrientation.Difference;

public class s extends RelativeLayout
{
  private View a;
  private o b;
  private OrientationEventListener c;
  private CBOrientation.Difference d = null;

  public s(Context paramContext, a parama)
  {
    super(paramContext);
    this.a = ((View)parama);
    this.b = new o(paramContext);
    addView(this.b, new RelativeLayout.LayoutParams(-1, -1));
    addView(this.a, new RelativeLayout.LayoutParams(-1, -1));
    this.d = Chartboost.sharedChartboost().getForcedOrientationDifference();
    this.c = new OrientationEventListener(paramContext, 3)
    {
      public void onOrientationChanged(int paramAnonymousInt)
      {
        CBOrientation.Difference localDifference = Chartboost.sharedChartboost().getForcedOrientationDifference();
        if (s.a(s.this) == localDifference)
          return;
        s.a(s.this, localDifference);
        ((s.a)s.b(s.this)).a();
        s.this.invalidate();
      }
    };
    this.c.enable();
    setOnTouchListener(new View.OnTouchListener()
    {
      public boolean onTouch(View paramAnonymousView, MotionEvent paramAnonymousMotionEvent)
      {
        return true;
      }
    });
  }

  public void a()
  {
    if (this.c != null)
      this.c.disable();
    this.c = null;
  }

  public o b()
  {
    return this.b;
  }

  public View c()
  {
    return this.a;
  }

  public boolean onTouchEvent(MotionEvent paramMotionEvent)
  {
    return true;
  }

  public static abstract interface a
  {
    public abstract void a();
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.chartboost.sdk.impl.s
 * JD-Core Version:    0.6.2
 */